package com.summer.safe.quartz.task;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

@Component
public class TaskRun {
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
    public void run(String params)
    {
        System.out.println(df.format(new Date())+"执行有参方法：" + params);
    }

    public void run()
    {
        System.out.println("执行无参方法");
    }
}
